<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div>Begin</div>

    <ul>
        <li>Information</li>
        <li>test</li>
    </ul>

    <div>End</div>

    <script>
        let nodeChildren = document.body.childNodes;
        console.log(nodeChildren.length);
        for (let i = 0; i < nodeChildren.length; i++) {
            console.log( nodeChildren[i] ); // Text, DIV, Text, UL, ..., SCRIPT
        }
        console.log('-------------------------');
        // for (let prop in nodeChildren) console.log(prop);
        let eleChidren = document.body.children;
        console.log(eleChidren.length);
        // for (let i = 0; i < eleChidren.length; i++) {
        //     console.log( eleChidren[i] );
        //     console.dir(eleChidren[i]);
        // }
        let divs = document.querySelectorAll('div');
        console.log('div length', divs.length);
    </script>

    <div>test</div>
    <script>
        console.log(nodeChildren.length); // ?
        console.log(eleChidren.length);
        console.log('div length', divs.length);
    </script>
</body>
</html>